package com.example.firstspringboot.mapper;

import com.example.firstspringboot.bean.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>以xml文件配置形式定义Mapper，实现数据库CRUD操作</p>
 * <p>对应文件位于 `resources/mybatis/mapper/UserMapper2.xml`</p>
 */
@Mapper
public interface UserMapper2 {
    User getOne(@Param("id") Long id);
    public List<User> getAll();
    public List<User> getAllWithoutId();
    void insert(User user);
    void update(User user);
    void delete(Long id);
}